import java.util.Scanner;

public class h_49 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("长字符串");
        String str = sc.nextLine();
        System.out.println("字串");
        String str1 = sc.nextLine();
        int count = 0;
        int start = 0;
        while (str.indexOf(str1, start) >= 0 && start < str.length()) {
            count++;
            start = str.indexOf(str1, start) + str1.length();
        }
        System.out.println(count);

    }
}
